﻿using EA;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace UMLSynthesizer.EAUMLSynthesizerPlugin.EAProjects
{
    abstract class EAProjectBase
    {
        #region Declarations

        /// <summary>
        /// Used due to an error embedding the original class EA.ConstLayoutStyles
        /// </summary>
        protected abstract class CustomLayoutStyles
        {
            public const int lsCrossReduceAggressive = 33554432;
            public const int lsCycleRemoveDFS = 1073741824;
            public const int lsCycleRemoveGreedy = -2147483648;
            public const int lsDiagramDefault = 0;
            public const int lsInitializeDFSIn = 201326592;
            public const int lsInitializeDFSOut = 67108864;
            public const int lsInitializeNaive = 134217728;
            public const int lsLayeringLongestPathSink = 805306368;
            public const int lsLayeringLongestPathSource = 536870912;
            public const int lsLayeringOptimalLinkLength = 268435456;
            public const int lsLayoutDirectionDown = 131072;
            public const int lsLayoutDirectionLeft = 262144;
            public const int lsLayoutDirectionRight = 524288;
            public const int lsLayoutDirectionUp = 65536;
            public const int lsProgramDefault = -1;
        }

        #endregion

        #region Fields

        protected Repository repository;

        #endregion

        #region Public interface

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="repository">The working repository</param>
        public EAProjectBase(Repository repository)
        {
            this.repository = repository;
        }

        /// <summary>
        /// Start the task
        /// </summary>
        public abstract void StartProject();

        /// <summary>
        /// The event that refresh the print into EnterpriseArchitect
        /// </summary>
        public abstract void RefreshPrint();

        #endregion
    }
}
